#ifndef _SPISERVICE_NETWORK_SERVICEINTERFACE_SPIDEV_ACTIONTRANSFERDF_H_
#define _SPISERVICE_NETWORK_SERVICEINTERFACE_SPIDEV_ACTIONTRANSFERDF_H_

#include "IAction.h"
#include "Spi_Dev_Management/ISpi_Dev.h"
#include "Maxieye_Spi_Mediator_Contre/Ibuffer_User_Register.h"

class Action_Transfer_Df : public IAction
{
public:
    Action_Transfer_Df(ISpi_Dev* dev, Ibuffer_User_Register* buffer_register);
    ~Action_Transfer_Df();

private:
    void execute() override;
    void register_rx_callback(std::function<void(const Soc_In_Data_Buffer*)> cb) override;

    ISpi_Dev* its_spi_dev;
    Soc_In_Data_Buffer* its_mcu_2_soc_data_buffer;
    Soc_Out_Data_Buffer* its_soc_2_mcu_data_buffer;
    uint8_t*             its_tx;
    uint8_t*             its_rx;
    std::function<void(const Soc_In_Data_Buffer*)> its_rx_cb;

    static constexpr uint16_t Time_Interval = 16*1000;//16 ms
};

#endif